<?php
/**
 * @package News Component
 */
//no direct access
defined('_JEXEC') or die('Restricted access');

$controller = JRequest::getVar('controller');
if(!$controller || $controller=='common') {
	$controller = 'common';
}
require_once( JPATH_COMPONENT.DS.'helper.php' );
require_once (JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php');

// Set the table directory
JTable::addIncludePath( JPATH_COMPONENT.DS.'tables' );

// Create the controller
$classname	= 'JanewsController'.$controller;
$controller = new $classname( );

//$model	= &$this->getModel( 'common' );
$view	= &$controller->getView( 'common','html','janewsView');
//$view->setModel( $model, true );
$view->display();
		
// Perform the Request task
$controller->execute( JRequest::getVar('task'));

// Redirect if set by the controller
$controller->redirect();

?>